<template>
	<view :style="{'background-color':bgcolor}" class="search-container">
		<view @click="handleSearch()" :style="{'border-radius':radis+'px'}" class="search-box">
			<uni-icons type="search" size="30"></uni-icons>
			<text class="placehoder">搜索</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"search",
		props:{
				bgcolor: {
					type : String,
					default: '#C00000'
				},
				radis :{
					type : Number,
					default : 18
				}
		},
		data() {
			return {
				
			};
		},
		methods:{
			handleSearch(){
				 this.$emit('Toclick')
			}
		}
	}
</script>

<style lang="scss">
	.search-container{
		height: 50px;
		display: flex;
		justify-content: center;
		align-items: center;
		padding: 0 10px;
		.search-box{
			width: 100%;
			background-color: white;
			height: 36px;
			display: flex;
			justify-content: center;
			align-items: center;
			.placehoder{
				font-size: 17px;
				margin-left: 5px;
			}
		}
	}
</style>